﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Firefly;
using Firefly.Libs;

namespace Guardian
{
    public sealed class MainMenu : MenuScreen
    {
        public static string Key = "ZIMAIN";
        //Fields
        private Texture2D background;

        //Construct
        public MainMenu(Game game)
            : base(game)
        {

        }


        //Methods
        public override bool LoadAssets(ContentManager content)
        {
            background = Game.Content.Load<Texture2D>("art/main/menubackground");

            return true;
        }

        public override void RenderMenu(SpriteBatch batch, GameTime time)
        {
            batch.Begin();

            batch.Draw(background, this.Manager.WindowRect, Color.White);

            batch.End();
        }

        public override void UpdateMenu(Input input, GameTime time)
        {
            if (input.IsNewKeyPress(Keys.F1))
                Manager.SwitchToGameScreen(RenderTest01.Key);
            else if (input.IsNewKeyPress(Keys.F2))
                Manager.SwitchToGameScreen(RenderTest02.Key);
            else if (input.IsNewKeyPress(Keys.F3))
                Manager.SwitchToGameScreen(RenderTest03.Key);
        }

        public override void OnShutdown()
        {

        }
    }
}
